import request from "@/utils/request";

// 查询排休管理列表
export function listRestbreaks(query) {
  return request({
    url: "/cld/restbreaks/list",
    method: "get",
    params: query,
  });
}

// 查询排休管理详细
export function getRestbreaks(restbreakId) {
  return request({
    url: "/cld/restbreaks/" + restbreakId,
    method: "get",
  });
}

// 新增排休管理
export function addRestbreaks(data) {
  return request({
    url: "/cld/restbreaks",
    method: "post",
    data: data,
  });
}

// 修改排休管理
export function updateRestbreaks(data) {
  return request({
    url: "/cld/restbreaks",
    method: "put",
    data: data,
  });
}

// 删除排休管理
export function delRestbreaks(restbreakId) {
  return request({
    url: "/cld/restbreaks/" + restbreakId,
    method: "delete",
  });
}

// 查询排休管理详细 - 表格形式
export function getTableCalendarList(restbreakId) {
  return request({
    url: "/cld/restbreaks/getTableCalendarList/" + restbreakId,
    method: "get",
  });
}

// 查询排休管理详细 - 日历个人排休一览
export function getCalendarByStaffId(query) {
  return request({
    url: "/cld/restbreaks/getCalendarByStaffId",
    method: "get",
    params: query,
  });
}
